package com.zhiche.lisa.tms.dao.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 装车单在途信息
 * </p>
 *
 * @author qichao
 * @since 2018-06-18
 */
@TableName("lisa_shipment_position")
public class ShipmentPosition extends Model<ShipmentPosition> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	@JsonSerialize(using=ToStringSerializer.class)
	private Long id;
    /**
     * gps格式的纬度信息
     */
	@TableField("gps_latitude")
	private BigDecimal gpsLatitude;
    /**
     * gps格式的经度信息
     */
	@TableField("gps_longitude")
	private BigDecimal gpsLongitude;
    /**
     * 装车单号
     */
	@TableField("shipment_code")
	private String shipmentCode;
    /**
     * 创建时间
     */
	@TableField("gmt_create")
	private Date gmtCreate;
	/**
	 * 详细地址
	 */
	@TableField("addr_text")
	private String addrText;

	/**
	 * 租户ID
	 */
	@TableField("tenant_id")
	private Long tenantId;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public BigDecimal getGpsLatitude() {
		return gpsLatitude;
	}

	public void setGpsLatitude(BigDecimal gpsLatitude) {
		this.gpsLatitude = gpsLatitude;
	}

	public BigDecimal getGpsLongitude() {
		return gpsLongitude;
	}

	public void setGpsLongitude(BigDecimal gpsLongitude) {
		this.gpsLongitude = gpsLongitude;
	}

	public String getShipmentCode() {
		return shipmentCode;
	}

	public void setShipmentCode(String shipmentCode) {
		this.shipmentCode = shipmentCode;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	public String getAddrText() {
		return addrText;
	}

	public void setAddrText(String addrText) {
		this.addrText = addrText;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "ShipmentPosition{" +
				"id=" + id +
				", gpsLatitude=" + gpsLatitude +
				", gpsLongitude=" + gpsLongitude +
				", shipmentCode='" + shipmentCode + '\'' +
				", gmtCreate=" + gmtCreate +
				", addrText='" + addrText + '\'' +
				'}';
	}

	public Long getTenantId() {
		return tenantId;
	}

	public void setTenantId(Long tenantId) {
		this.tenantId = tenantId;
	}
}
